/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * CopyingPanel.java
 *
 * Created on 7/06/2009, 12:24:45 AM
 */

package gui;

/** El panel que se muestra durante el proceso de instalación.
 *
 *  @author Sergio
 */

public class CopyingPanel extends javax.swing.JPanel {

    /** Creates new form CopyingPanel */
    public CopyingPanel() {
        initComponents();
    }

    /** Establece el estado para desplegar en la etiqueta.
     *
     *  @param status La cadena para desplegar.
     */

    public void setStatus(String status)
    {
        this.status.setText(status);
    }

    /** Establece la cantidad total de tareas que serán ejecutadas.
     *
     *  @param totalTasks La cantidad total de tareas.
     */

    public void setTotalTasks(int totalTasks)
    {
        this.copyingProgress.setMinimum(0);
        this.copyingProgress.setMaximum(totalTasks);
    }

    /** Establece la cantidad de tareas que han sido ejecutadas hasta el
     *  momento.
     *
     *  @param progress La cantidad de tareas ejecutadas.
     */

    public void setCurrentProgress(int progress)
    {
        this.copyingProgress.setValue(progress);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        copyingTip = new javax.swing.JLabel();
        copyingProgress = new javax.swing.JProgressBar();
        status = new javax.swing.JLabel();

        copyingTip.setText("Por favor espere mientras las acciones seleccionadas son realizadas, esto puede tardar varios minutos");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(copyingProgress, javax.swing.GroupLayout.DEFAULT_SIZE, 587, Short.MAX_VALUE)
                    .addComponent(copyingTip)
                    .addComponent(status, javax.swing.GroupLayout.DEFAULT_SIZE, 587, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(copyingTip)
                .addGap(30, 30, 30)
                .addComponent(copyingProgress, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(status)
                .addContainerGap(220, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JProgressBar copyingProgress;
    private javax.swing.JLabel copyingTip;
    private javax.swing.JLabel status;
    // End of variables declaration//GEN-END:variables

}
